package com.hgyc.mom.wms.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.annotation.DictColumn;
import com.hgyc.mom.core.annotation.TableDict;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 生产退料单明细
 * </p>
 *
 * @author fwj
 * @since 2025-07-09
 */
@Data
@TableName("wms_product_return_detail")
@Schema(name="生产退料单明细对象", description="生产退料单明细对象")
public class WmsProductReturnDetail implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private Long id;

    @EQ
    @Schema(description = "退料单ID")
    private Long returnId;

    @Excel(name = "产品物料ID")
    @Schema(description = "产品物料ID")
    @TableDict(table = "base_material", key = "id" , columns = {
            @DictColumn(name ="material_code", alias = "materialCode"),
            @DictColumn(name = "material_name", alias = "materialName")
    })
    private Long materialId;

    @Excel(name = "计划退料数量")
    @Schema(description = "计划退料数量")
    private BigDecimal requestReturnQty;

    @Excel(name = "实际退料数量")
    @Schema(description = "实际退料数量")
    private BigDecimal actualReturnQty;

    @Excel(name = "批次号")
    @Schema(description = "批次号")
    private String lotNo;

    @Excel(name = "库位ID")
    @Schema(description = "库位ID")
    @TableDict(table = "wms_warehouse", key = "id" , columns = {
            @DictColumn(name ="name", alias = "locationName")
    })
    private Long locationId;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}